'use strict';

module.exports = app => {
  const {
    STRING,
    INTEGER,
    ENUM
  } = app.Sequelize;

  const Fitment = app.model.define('fitment', {
    zx_id: {
      type: INTEGER,
      primaryKey: true,
      autoIncrement: true
    },
    user_id: STRING,
    del: STRING,
    text: STRING,
    created_at: {
      type: INTEGER
    },
  });
  Fitment.associate = () => {
    // associations can be defined here
    app.model.Fitment.belongsTo(app.model.User, {
      foreignKey: 'user_id'
    });

  };
  return Fitment;
};